<template>
  <div class="hello" id="bill" :style="{minHeight: currHeight + 'px'}">
    <!-- 导航栏 -->
    <div class="navBox">
      <van-nav-bar
      title="账单"
      left-text="返回"
      right-text="•••"
      left-arrow
      @click-left="onClickLeft"
      @click-right="onClickRight"
      />
    </div>
    <!-- 账户余额 -->
    <div class="balanceOfAccount">
        <span class="leftContent">账户余额</span>
        <span class="rightContent">{{money}}</span>
    </div>
    <!-- 在线支付 -->
    <div class="onlinePayment" v-for="(list,index) in lists" :key="index">
        <p class="topContent">
            <span class="leftContent">在线支付</span>
            <span class="rightContent">{{list.plusNumber}}</span>
        </p>
        <p class="bottomContent">
            <span class="leftContent">微信支付</span>
            <span class="rightContent">{{list.time}}</span>
        </p>
    </div>
  </div>
</template>

<script>
export default {
  name: 'Bill',
  data () {
    return {
        money:'￥2000.00',
        lists:[
            {
                plusNumber:'+ ¥548.58',
                time:'2016.01.25',
            },
            {
                plusNumber:'- ¥548.58',
                time:'2016.01.25',
            },
        ],
        currHeight: ''
    }
  },
  methods: {
    onClickLeft() {
     
      this.$router.go(-1)
    },
    onClickRight() {
     
    },
  },
  mounted(){
      this.currHeight = document.documentElement.clientHeight
      window.onresize = () => {
          this.currHeight = document.documentElement.clientHeight
      }
  }
}
</script>

<style scoped lang='less'>
body{
    background: #f3f4f6;

}
// 大背景
.hello{
    background: #f3f4f6;
    
}
// 导航栏
.navBox{
  width: 100%;
  height: 90px;
}
.van-nav-bar__content{
  height: 90px;
  background:rgba(48, 48, 50, );
  line-height: 90px;
  .van-nav-bar__text{
    color: #fff;
  }
  .van-nav-bar__title{
    color: #fff;
  }
  .van-icon{ 
    color: #fff;
  }
}
// 账户余额
.balanceOfAccount{
    width: 100%;
    height: 120px;
    background: #fff;
    margin-top: 26px;
    font-size: 28px;
    line-height: 120px;
    padding: 0 32px 0 27px;
    margin-bottom: 34px;
    .leftContent{
        float: left;
    }
    .rightContent{
        float: right;
        color: #ff5858;
    }
}
// 在线支付
.onlinePayment{
    width: 100%;
    height: 160px;
    background: #fff;
    padding: 0 26px 0 26px;
    box-sizing: border-box;
    font-size: 28px;
    overflow: hidden;
    margin-top: 1px;
    .topContent{
        width: 100%;
        height: 50px;
        margin-top: 20px;
        .leftContent{
        float: left;
        }
        .rightContent{
            float: right;
            color: #ff5858;
        }
    }
    .bottomContent{
        width: 100%;
        height: 50px;
        color: #999;
        font-size: 16px;
        margin-top: 10px;
        .leftContent{
            float: left;
        }
        .rightContent{
            float: right;
        }
    }
}
</style>
